(direct_output_for_insert): If char_ins_del_ok is
authorGerd Moellmann <gerd@gnu.org>
Wed, 17 Jan 2001 16:53:55 +0000 (16:53 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 17 Jan 2001 16:53:55 +0000 (16:53 +0000)
zero, use this method only at the end of a line.

src/dispnew.c

index f9d9fb2d8566b186adf188875c435b11be30b0b6..c18838df2bf27d43b53f9fd45eef15157fd1aa03 100644 (file)
@@ -3417,6 +3417,12 @@ direct_output_for_insert (g)
       || (!window_redisplay_p && !WINDOW_FULL_WIDTH_P (w)))
     return 0;
 
+  /* If we can't insert glyphs, we can use this method only
+     at the end of a line.  */
+  if (!char_ins_del_ok)
+    if (PT != ZV && FETCH_BYTE (PT_BYTE) != '\n')
+      return 0;
+
   /* Set up a display iterator structure for W.  Glyphs will be
      produced in scratch_glyph_row.  Current position is W's cursor
      position.  */